import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
    token: "",
    current_user: {}
}
const mutations = {
    INIT_STORE(state, data) {
        state.token = data.token,
        state.current_user = data.user
    },
    DELETE_STORE(state) {
        state.token = "",
        state.current_user = {}
    }
}

export default new Vuex.Store({
    state, mutations
})
